package com.xyz.dao.logic;

import com.free.ext.mybatis.model.entity.PageResponseModel;
import com.xyz.dao.dao.SVipDetailDao;
import com.xyz.domain.table.SVipDetail;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class SVipDetailLogic {

    @Autowired
    private SVipDetailDao sVipDetailDao;

    public SVipDetail add(SVipDetail sVipDetail){
        return sVipDetailDao.insert(sVipDetail);
    }

    public Integer update(SVipDetail sVipDetail){
        return sVipDetailDao.update(sVipDetail);
    }

    public List<SVipDetail> list(SVipDetail sVipDetail, String orderBy){
        return sVipDetailDao.selectList(sVipDetail, orderBy);
    }

    public Integer delete(Integer key){
        return sVipDetailDao.delete(key);
    }

    public PageResponseModel<SVipDetail> pageInfo(SVipDetail sVipDetail, String orderBy, Integer pageNo, Integer pageSize){
        return sVipDetailDao.selectByPageNo(sVipDetail, orderBy, pageNo, pageSize);
    }

}